using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Linq;

namespace LiJ.Framework.Official.Basic.Mos
{
	/// <summary>
	///  获取openid列表的响应实体
	/// </summary>
	public class WxOpenIdsResp : WxBaseResp
	{
		/// <summary>
		/// 这次获取的粉丝数量
		/// </summary>
		public int count
		{
			get;
			set;
		}

		/// <summary>
		/// 拉取列表最后一个用户的openid
		/// </summary>
		public string next_openid
		{
			get;
			private set;
		}

		/// <summary>
		/// openid 列表
		/// </summary>
		public List<string> openid_list
		{
			get;
			private set;
		}

		/// <summary>
		/// 微信返回的包含openid的对象，解析出openid_list之后就不用了
		/// </summary>
		public object data
		{
			set
			{
				this.openid_list = ((value != null) ? ((JToken)value)["openid"].Values<string>().ToList() : new List<string>());
			}
		}
	}
}
